﻿using com.yoozoo.gta.Gameplay.PVE;
using System;
using System.Collections.Generic;
using UnityEngine;

namespace Yoozoo.Gameplay.City
{
    // 目前房间未解锁状态（room_before)以及RTS事件的房间和已解锁房间没有任何区别
    // 以后可能会添加一下区别，如隐藏某些网格，替换材质等

    [Serializable]
    public class VariantInfo
    {
        /// <summary>
        /// 原预制体名
        /// </summary>
        public string PrefabName;

        /// <summary>
        /// 变体名
        /// </summary>
        public string VariantName;
    }

    /// <summary>
    /// 内城预制体信息
    /// </summary>
    [Serializable]
    public class CityScenePrefabInfo
    {
        /// <summary>
        /// 预制体名，如InnerCity_61001
        /// </summary>
        public string PrefabName;
        /// <summary>
        /// 是不是变体，如InnerCity_61001_before，4X_event_rts_01
        /// </summary>
        public bool IsVariant;
        /// <summary>
        /// 是变体的情况，原始预制体名字，如 InnerCity_61001_before → InnerCity_61001
        /// </summary>
        public string RawPrefabName;
        /// <summary>
        /// 是不是受到LightMap影响，不影响的话不需要导出
        /// </summary>
        public bool IsLightMapped;
        /// <summary>
        /// 预制体路径
        /// </summary>
        public string AssetPath;
    }

    /// <summary>
    /// 内城房间的导出工具 （用于2D版内城的3D房间导出）
    /// </summary>
    public class CitySceneSeparateManager : BaseSceneSeparateManager
    {
        [Header("该节点下的物件不生成阴影")] 
        public string NonCasterShadowRoot = "shineijiajv";

        [Header("以下房间不生成变体")] 
        public string[] NoVariantRooms = new string[] { };

        [Header("以下物件生成变体")]
        public string[] VariantPrefabs = new string[] { };

        [Header("导出后再创建变体")] 
        public bool CreateVariantAfterExport = true;

        [Header("预制体信息")]
        public List<CityScenePrefabInfo> PrefabInfos = new List<CityScenePrefabInfo>();

        [Header("变体生成信息")]
        public List<VariantInfo> VariantInfos = new List<VariantInfo>();
    }
}
